public class problem9 {
    public static void main(String[] args) {
        for (int a = 1; a < 999; a++) {
            double aSquared = Math.pow(a, 2);
            for (int b = a + 1; b < 999; b++) {
                double bSquared = Math.pow(b, 2);
                for (int c =b + 1; c < 999; c++) {
                    double cSquared = Math.pow(c, 2);
                    if (aSquared + bSquared == cSquared) {
                        if (a + b + c == 1000) {
                            System.out.println(a + "+" + b + "+" + c);
                            System.out.println(a * b * c);
                        }
                    }
                }
            }
        }
    }
}
